﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using School.Entities;
using System.Collections;

namespace School.Uniform
{
   public static class PayOrder
    {
        private static SchoolEntities db = new SchoolEntities();
        public static IEnumerable<ORG_Campus> AllCampus()
        {
            var query = from campus in db.ORG_Campus select campus;
            return query.ToList();
        }
        public static IEnumerable<ORG_Certificate> AllCertificate()
        {
            var query = from certificate in db.ORG_Certificate select certificate;
            return query.ToList();
        }
        public static IEnumerable<ORG_Certificate> GetCertificateByCamp(int campId)
        {
            var query = from certificate in db.ORG_Certificate select certificate;
            return query.ToList().Where(c => c.Campus_Id == campId);
        }
        public static IEnumerable<ORG_Stage> AllStadge()
        {
            var query = from stadge in db.ORG_Stage select stadge;
            return query.ToList();
        }
        public static IEnumerable<ORG_Stage> GetStadgeByCertificate(int certId)
        {
            var query = from stadge in db.ORG_Stage select stadge;
            return query.ToList().Where(s =>s.Certificate_Id == certId);
        }
        public static IEnumerable<ORG_Grade> AllGrade()
        {
            var query = from Grade in db.ORG_Grade select Grade;
            return query.ToList();
        }
        public static IEnumerable<ORG_Grade> GetGradeByStadge(int stagId)
        {
            var query = from Grade in db.ORG_Grade select Grade;
            return query.ToList().Where(s => s.Stage_Id == stagId);
        }
        //public static IEnumerable<SRV_Clothe_Type> AllSrv_Clothe_Type()
        //{
        //    var query = from srv_clothe_Type in db.SRV_Clothe_Type select srv_clothe_Type;
        //    return query.ToList();
        //}
        public static IEnumerable<SRV_Clothe> AllSrv_Clothe()
        {
            var query =
              from clothe in db.SRV_Clothe
              select clothe;
            return query.ToList();
        }
   
    }
}
